All Questions
Tagged with relational-databaseorm
10 questions
0votes
1answer
309views
Approach for store multiple relationships POO objects in relational database
I'm developing a system in which a ClassA object can have multiple ClassB and ClassC objects. And for store these objects in a relational DB model I create the following tables: This is a simplified ...
-2votes
2answers
113views
Select from many-to-many in one query
A common issue I run into when building CRUD applications is how to retrieve many-to-many relationships from the database and put them into an object model. Say, for example, I have the following data ...
2votes
1answer
5kviews
Updating sub-properties via Entity Framework
I was wondering how to updated nested objects/sub-properties when using Entity Framework. But to make things clear, let's start with an example. I have an object, which can own a number of other ...
8votes
3answers
2kviews
Is ORM a bad tool for tree-like DB structures?
I know this question might be closed as opinion-based, but what I need right now are some opinions supported by arguments. I am building an application with Postgres and Ecto (Elixir) as the ...
1vote
0answers
41views
Database Constraint from another table column
Let's consider the following objects : Article which can be of different types Equipment which point to an Article, some fields on equipment are only used for some types. I want to add constraint to ...
2votes
2answers
140views
Labeling the multiplicities in class-table mappings
Trying this again but with a slightly different approach. My previous thread was here Can anyone explain this one-to-one, one-to-many, many-to-one, many-to-many concept with respect to ORMs? but ...
8votes
4answers
18kviews
Can anyone explain this one-to-one, one-to-many, many-to-one, many-to-many concept with respect to ORMs?
A lot of ORM sites and SQL tutorials mention these relationships as if they are obvious or to be taken for granted, but I don't fully understand why the distinctions need to be made. Consider two ...
7votes
3answers
301views
How to model and store an entity which has "one or more" values
I'll use C# to design the model to be persisted Let's suppose I have the following entity: public class Episode { public int Id { get; set; } public string Title { get; set; } public ...
7votes
5answers
18kviews
Externalising SQL Queries in Java
What are the advantages and disadvantages of externalising SQL queries in Java (or similar general-purpose object-oriented programming language. Externalizing means storing all SQL in a separate non-...
7votes
4answers
8kviews
Is there really Object-relational impedance mismatch?
It is always stated that it is hard to store applications objects in relational databases - the object-relational impedance mismatch - and that is why Document databases are better. However, is there ...